public class Library implements IVisitor {
    @Override
    public String visit(Student student) {
        return "学生："+student.getStudentName()+"\t一卡通号码为：\tF"+student.getStudentNo();
    }

    @Override
    public String visit(Teacher teacher) {
        return "教师："+teacher.getTeacherName()+"\t一卡通号码为：\tT"+teacher.getTeacherNo();
    }

    @Override
    public String visit(Professor professor) {
        return "教授："+professor.getProfessorName()+"\t一卡通号码为：\tP"+professor.getProfessorNo();
    }
}
